<%@page import="org.shop.entity.security.MyUserDetail" %>
<%@page import="org.shop.util.ObjUtil" %>
<%@page import="org.springframework.security.core.context.SecurityContextImpl" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE html>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";

    SecurityContextImpl securityContextImpl = (SecurityContextImpl) request.getSession().getAttribute("SPRING_SECURITY_CONTEXT");
    MyUserDetail ud = null;
    Byte state = 0;
    if (ObjUtil.isNotNullAndEmpty(securityContextImpl)) {
        ud = (MyUserDetail) securityContextImpl.getAuthentication().getPrincipal();
        state = ud.getState();
    }
%>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width,initial-scale=1 user-scalable=0">
    <title>论坛</title>
    <link rel="stylesheet" href="<%=basePath%>assets/css/public.css">
    <link rel="stylesheet" href="<%=basePath%>assets/css/page.css">
    <link rel="stylesheet" href="<%=basePath%>assets/font-awesome-4.7.0/css/font-awesome.min.css">
    <script src="<%=basePath%>assets/js/jquery-2.1.1.min.js"></script>
    <script src="<%=basePath%>assets/js/fontSize.js"></script>
    <link href="<%=basePath%>/assets/layer/mobile/need/layer.css" rel="stylesheet" type="text/css">
    <script src="<%=basePath%>/assets/layer/mobile/layer.js"></script>

    <style>
        body {
            padding-top: 0.8rem;
            padding-bottom: 1rem;
            background-color: #F3F1F1;
        }

        .job_info, .job_details {
            position: relative;
            padding: 0.2rem;
            background-color: #fff;
        }

        .job_name, .promulgator, .details, .required, .contact {
            font-size: 0.28rem;
            line-height: 0.64rem;
            /*font-weight: bold;*/
        }

        .point_info {
            height: 0.8rem;
            line-height: 0.4rem;
            padding-bottom: 0.1rem;
        }

        .pay {
            position: absolute;
            top: 0.2rem;
            right: 0.2rem;
            font-size: 0.28rem;
            color: #FF2828;
        }

        .pay i {
            font-size: 0.3rem;
        }

        .add, .time {
            font-size: 0.2rem;
            color: #747474;
        }

        .photo {
            width: 0.8rem;
        }

        .company {
            margin: 0.1rem 0 0;
        }

        .photo img {
            width: 0.8rem;
            height: 0.8rem;
            border-radius: 50%;
        }

        .company_name {
            font-size: 0.24rem;
        }

        .company_time {
            color: #989898;
            font-size: 0.2rem;
        }

        .info {
            line-height: 0.4rem;
            margin-left: 0.1rem;
        }

        .details_p, .required_p, .contact_p {
            line-height: 0.4rem;
            font-size: 0.22rem;
            color: #666;
            padding-bottom: 0.1rem;
        }

    </style>
</head>
<body>
<input id="basePath" type="hidden" value="<%=basePath%>">
<div class="header">
    <a class="returnInfo" href="#" onclick="window.history.go(-1)"><i class="fa fa-angle-left"></i></a>
    职位详情
</div>
<div class="job_info border-bottom-8">
    <div class="job_name">
       ${recruitment.jobName}
    </div>
    <div class="point_info border-bottom-1">
        <span class="time">工作时间：<i>${recruitment.wordTime}</i></span><br>
        <span class="add">工作地点：<i>${recruitment.workPlace}</i></span>
    </div>
    <div class="promulgator">
        ${recruitment.userName}
    </div>
    <div class="company clearFirx">
        <div class="photo float_l">
        	<c:if test="${recruitment.userHeadImg eq null}">
            	<img src="<%=basePath%>assets/images/timg(2).jpg" alt="">
            </c:if>
        	<c:if test="${recruitment.userHeadImg ne null}">
            	<img src="<%=basePath%>app/getGoodsPhotoByName?goodsImage=${recruitment.userHeadImg}" alt="">
            </c:if>
        </div>
        <div class="info float_l">
            <span class="company_name">${recruitment.company}</span><br>
            <span class="company_time"><fmt:formatDate value="${recruitment.createDate}" type="both"/></span>
        </div>
    </div>
    <div class="pay">
        <i class="fa fa-rmb"></i>
        <c:if test="${recruitment.settlementWay eq 0}">
         ${recruitment.salary}/日
        </c:if>
        <c:if test="${recruitment.settlementWay eq 1}">
         ${recruitment.salary}/月
        </c:if>
    </div>
</div>
<div class="job_details">
    <div class="details">
        职位详情
    </div>
    <div class="details_p border-bottom-1">
    	${recruitment.workDetails}
<!--         <p>1.你想干嘛就干嘛</p> -->
<!--         <p>2.好吃的随便你吃，好喝的随便你喝</p> -->
<!--         <p>3.累了就躺着，困了就睡觉，没意思就玩手机</p> -->
    </div>
    <div class="required">
        职位要求
    </div>
    <div class="required_p border-bottom-1">
<!--         <p>1.想来工作吗？</p> -->
<!--         <p>2.做梦！</p> -->
		${recruitment.workRequirements}
    </div>
    <div class="contact">
        联系方式
    </div>
    <div class="contact_p">
        <p>手机号：<span>${recruitment.userPhone}</span></p>
    </div>
</div>
</body>
</html>